﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using DataAnnotationsExtensions;

namespace BenzInfo.Hockey.LHRAF.Models
{
    [Table("Teams")]
    public class Team
    {
        [Key]
        public int Id { get; set; }

        [Required]
        [Display(Name = "DisplayName", ResourceType = typeof(Resources.Models.Team))]
        public string Name { get; set; }

        [Required]
        [Display(Name = "DisplayYear", ResourceType = typeof(Resources.Models.Team))]
        public int Year { get; set; }

        [InverseProperty("Team")]
        public virtual ICollection<Player> Players { get; set; }

        [FileExtensions("png|jpg|jpeg|gif")]
        [Display(Name = "DisplayLogo", ResourceType = typeof(Resources.Models.Team))]
        public string Logo { get; set; }

        [FileExtensions("png|jpg|jpeg|gif")]
        [Display(Name = "DisplayPicture", ResourceType = typeof(Resources.Models.Team))]
        public string Picture { get; set; }
    }
}